#! /bin/bash

source activate pytorch

while true
do
    res=`ps -ef | grep rpe_recipe.sh | grep -v grep | wc -l`
    if [ $res -eq  0 ]
    then
        echo "rpe_recipe.sh 执行完毕"
        break
    else
        echo "rpe_recipe.sh 执行中, sleep 300"
        sleep 300
    fi

done


datasets='recognition36'
shot='5'
tripws='0.5 1'
margins="0.1 0.3 0.5"
solvers='opencv qpth'

for solver in $solvers
do
    for dataset in $datasets
    do
        for margin in $margins
        do
            for tripw in $tripws
            do
                echo "python eval_semi_logits_triplet_loss.py -gpu 0 -shot $shot -test_episode 600 -dataset $dataset --with_SA --SA_res --no_mlp --SA_dropout 0.5 --pos_embed --model_name resnet_MyResSA --sche CosineLR --triplet_loss --show_detail -sfc_lr 100  -mse 10 --triplet_weight $tripw --triplet_distance_solver $solver --triplet_margin $margin"
                python eval_semi_logits_triplet_loss.py -gpu 0 -shot $shot -test_episode 600 -dataset $dataset --with_SA --SA_res --no_mlp --SA_dropout 0.5 --pos_embed --model_name resnet_MyResSA --sche CosineLR --triplet_loss --show_detail -sfc_lr 100 -mse 10 --triplet_weight $tripw --triplet_distance_solver $solver --triplet_margin $margin
            done
        done
    done
done